package com.loan.job.service;

import com.loan.system.service.UserService;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.concurrent.TimeUnit;

/**
 * @author shiguang
 * @date 2022年09月17日 17:07
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class OperatorService {

    private final UserService userService;

    /**
     * 获取运营商报告
     * @throws Exception
     */
    @XxlJob("getOperatorHandler")
    public void demoJobHandler() throws Exception {
        XxlJobHelper.log("run getOperatorHandler.");
        userService.updateUserOperatorStatus();
    }
}
